<?php

namespace App\Model\Entity;

use Illuminate\Database\Eloquent\Model;

class AdminRole extends Model
{
    public $timestamps = false;
    protected $fillable = ['name', 'slug'];

    public function getPermissions()
    {
        return $this->belongsToMany('App\Model\Entity\AdminMenu', 'admin_role_menus', 'role_id', 'menu_id');
    }
}
